<?php echo Modules::run('admin/header'); ?>
<!-- start content-outer ........................................................................................................................START -->
<div id="content-outer">
<!-- start content -->
<div id="content">

	<!--  start page-heading -->
	<div id="page-heading">
		<h1></h1>
	</div>
	<!-- end page-heading -->

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
            <th rowspan="3" class="sized"><img src="<?php echo base_url('images/shared/side_shadowleft.jpg') ?>" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
                <th rowspan="3" class="sized"><img src="<?php echo base_url('images/shared/side_shadowright.jpg') ?>" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		
			<!--  start table-content  -->
			<div id="table-content">
			
				<?php 
					if( isset($message) && !empty($message) )
					{
						echo $message; 
					}					
				?>
				 				
				<!--  start product-table ..................................................................................... -->
				<?php 
				            if( isset($companies) && !empty($companies) )
				            {                
				?>
				<form id="mainform" action="">
				    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
				        <tr>
				            <th class="table-header-check"><a id="toggle-all" ></a> </th>
				            <th class="table-header-repeat line-left minwidth-1"><a href="">Name</a>	</th>
				            <th class="table-header-repeat line-left minwidth-1"><a href="">Shortname</a></th>
				            <th class="table-header-repeat line-left"><a href="">Address</a></th>
				            <th class="table-header-repeat line-left"><a href="">Email</a></th>
				            <th class="table-header-repeat line-left"><a href="">Website</a></th>
				            <th class="table-header-options line-left"><a href="">Options</a></th>
				        </tr>        
				        <?php
				            $i = 1;
				            foreach ($companies as $info)
				            {
				                $style = ($i % 2 == 0) ? 'alternate-row' : '';
				        ?>
				        <tr <?php echo $style; ?>>
				            <td><input  type="checkbox"/></td>
				            <td><?php echo $info['name']; ?></td>
				            <td><?php echo $info['shortname'] ?></td>
				            <td><a href=""><?php echo $info['address'] ?></a></td>
				            <td><?php echo $info['email'] ?></td>
				            <td><a href=""><?php echo $info['website'] ?></a></td>
				            <td class="options-width">
				                <a href="<?php echo site_url('admin/editCompanyInfo/'. $info['id']) ?>" title="Sửa" class="icon-1 info-tooltip"></a>
				                <a href="<?php echo site_url('admin/deleteCompanyInfo/'. $info['id']) ?>" onClick="javascript:return confirm('Bạn có chắc sẽ xóa nội dung này ?');" title="Xóa" class="icon-2 info-tooltip"></a>
				                <!--<a href="" title="Edit" class="icon-3 info-tooltip"></a>
				                <a href="" title="Edit" class="icon-4 info-tooltip"></a>
				                <a href="" title="Edit" class="icon-5 info-tooltip"></a>-->
				            </td>
				        </tr>       
				        <?php 
				            }
				        ?>
				    </table>
				</form>
				<?php                
				            }
				            else
				            {
				                echo 'No data available !';
				            }
				?>				
				<!--  end product-table................................... --> 				
			</div>
			<!--  end content-table  -->
		
			<!--  start actions-box ............................................... -->
			<div id="actions-box">
				<a href="" class="action-slider"></a>
				<div id="actions-box-slider">
                    <a onclick="top.location=this.href;" href="<?php echo site_url('admin/addCompanyInfo'); ?>" class="action-edit">Add</a>
					<a onclick="top.location=this.href" href="<?php echo site_url('admin/editCompanyInfo/1'); ?>" class="action-edit">Edit</a>
					<a onclick="top.location=this.href;" href="<?php echo site_url('admin/deleteCompany/1'); ?>" class="action-delete">Delete</a>
				</div>
				<div class="clear"></div>
			</div>
			<!-- end actions-box........... -->
			
			<!--  start paging..................................................... -->
			<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
			<tr>
			<td>
				<?php echo $pagination; ?>
			</td>
			<td>
			<!--<select  class="styledselect_pages">
				<option value="">Number of rows</option>
				<option value="">1</option>
				<option value="">2</option>
				<option value="">3</option>
			</select>-->
			</td>
			</tr>
			</table>
			<!--  end paging................ -->
			
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>
<!--  end content -->
<div class="clear">&nbsp;</div>
</div>
<!--  end content-outer........................................................END -->
<?php echo Modules::run('admin/footer') ?>